<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>运费方案管理</title>
    <link rel="stylesheet" type="text/css" href="../static/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../static/easyui/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/freight.css" />
    <script type="text/javascript" src="../static/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="../static/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../static/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../static/js/freight.js"></script>
</head>
<body>
<table id="dg" class="easyui-datagrid" fit="true" fitColumns="true" pagination="true" rownumbers="true"
       singleSelect="false" url="/freight/list" pageList="[30,40,50]" pageSize="30" toolbar="#tb" striped="true"
       title="运费方案管理">
    <thead>
    <tr>
        <th field="freightId" width="20" align="center">序号</th>
        <th field="area" width="50" align="center">地区</th>
        <th field="expectedCost" width="50" align="center">预计费用</th>
        <th field="description" width="100" align="center">运费方案描述</th>
        <th field="customerDescription" width="150" align="center">运费方案客户描述</th>
        <th field="action" width="80" align="center" formatter="formatAction">操作</th> <!-- 添加操作列 -->
    </tr>
    </thead>
</table>

<div id="tb">
    <div>
        <a href="javascript:openFreightAddDialog()" class="easyui-linkbutton" iconCls="add" plain="true">新增</a>
        &nbsp;地区：&nbsp;<input type="text" id="s_area" onkeydown="if(event.keyCode===13) searchFreight()"/>
        <a href="javascript:searchFreight()" class="easyui-linkbutton" iconCls="search" plain="true">搜索</a>
    </div>
</div>

<div id="dlg" class="easyui-dialog" closed="true" buttons="#dlgTb">
    <form method="post" id="fm">
        <table cellspacing="8px">
            <tr>
                <td>地区:</td>
                <td><input id="area" name="area" type="text" /></td>
            </tr>
            <tr>
                <td>预计费用:</td>
                <td><input id="expectedCost" name="expectedCost" type="text" /></td>
            </tr>
            <tr>
                <td>运费方案描述:</td>
                <td><input id="description" name="description" type="text" /></td>
            </tr>
            <tr>
                <td>运费方案客户描述:</td>
                <td><textarea id="customerDescription" name="customerDescription" rows="5" cols="40"></textarea></td>
            </tr>
        </table>
        <!-- 添加隐藏的 freightId 字段 -->
        <input type="hidden" id="freightId" name="freightId" />
    </form>
</div>

<div id="dlgTb">
    <a href="javascript:saveData()" class="easyui-linkbutton" iconCls="save">保存</a>
    <a href="javascript:closeDlg()" class="easyui-linkbutton" iconCls="closed">关闭</a>
</div>
</body>
</html>